from flask import Flask
from config import config_dict
from flask_session import Session
from flask_sqlalchemy import SQLAlchemy
from info.modules.news import new_blue

db=SQLAlchemy()

def create_app(config_name):
    app=Flask(__name__)



    app.config.from_object(config_dict[config_name])
    Session(app)
    db.init_app(app)
    app.register_blueprint(new_blue)


    return app